package com.batchengine.test;

import com.batchengine.util.LoggingFactory;
import com.batchengine.worker.WorkSelector;
import org.apache.log4j.Logger;

/**
 * User: sunil.incubator@yahoo.com
 * Date: Sep 16, 2009
 * Time: 11:13:26 AM
 */
public class HelloWorldScheduledSelector extends WorkSelector<String> {

    private static final Logger logger = LoggingFactory.createLogger();

    @Override
    public boolean fillWork() throws InterruptedException {

        for (int i = 1; i <= 100; i++) {
            addToQ(java.lang.String.valueOf(i));
        }
        logger.info(java.lang.String.format("After adding size %s", getTotalWorkSize()));
        return true;
    }
}